<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::post('img/upload', 'ImgController@upload');
Route::post('img/get', 'ImgController@get');
Route::post('img/del', 'ImgController@del');
Route::post('img/getLike', 'ImgController@getLike');
Route::post('img/addLike', 'ImgController@addLike');

Route::post('user/store', 'UserController@store');
Route::post('user/getOpenId', 'UserController@getOpenId');

Route::post('ip/ping', 'IpController@ping');
Route::post('ip/store', 'IpController@store');
Route::post('ip/getUserHost', 'IpController@getUserHost');
Route::post('ip/delUserHost', 'IpController@delUserHost');
Route::post('ip/addToCrontab', 'IpController@addToCrontab');
Route::post('ip/getCrontabList', 'IpController@getCrontabList');
Route::post('ip/delCrontabItem', 'IpController@delCrontabItem');
Route::post('weiXin/addFormId', 'WeiXinController@addFormId');
Route::post('weiXin/sendMsg', 'WeiXinController@sendMsg');
